package com.aracky.assess.model.entity;

import com.aracky.common.entitybase.BaseCommonEntity;
import com.baomidou.mybatisplus.annotation.*;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Getter;
import lombok.Setter;

import java.math.BigDecimal;
import java.time.LocalDate;

/**
 * <p>
 * 用户绩效考核
 * </p>
 *
 * @author zzp
 * @since 2022-08-01 09:43:18
 */
@Getter
@Setter
@TableName("hr_kpi_user_performance_header")
@ApiModel(value = "HrKpiUserPerformanceHeader对象", description = "用户绩效考核")
public class HrKpiUserPerformanceHeader extends BaseCommonEntity {

    @ApiModelProperty("配置ID")
    @TableId(value = "id",type = IdType.AUTO)
    private Long id;

    @ApiModelProperty("用户ID")
    @TableField("user_id")
    private Long userId;

    @ApiModelProperty("岗位ID")
    @TableField("post_id")
    private Long postId;

    @ApiModelProperty("考核类型，M月度考核、S季度考核、Y年度考核")
    @TableField("performance_type")
    private String performanceType;

    @ApiModelProperty("考核周期，xxxx年xx月、xxxx年第x季度，xxxx年")
    @TableField("performance_period")
    private String performancePeriod;

    @ApiModelProperty("开始时间")
    @TableField("start_date")
    private LocalDate startDate;

    @ApiModelProperty("结束填报时间")
    @TableField("end_write_date")
    private LocalDate endWriteDate;

    @ApiModelProperty("结束评分日期")
    @TableField("end_assessor_date")
    private LocalDate endAssessorDate;

    @ApiModelProperty("第一评分人ID")
    @TableField("assessor1")
    private Long assessor1;

    @ApiModelProperty("第一评分人权重")
    @TableField("weight_percent1")
    private Integer weightPercent1;

    @ApiModelProperty("第二评分人ID")
    @TableField("assessor2")
    private Long assessor2;

    @ApiModelProperty("第二评分人权重")
    @TableField("weight_percent2")
    private Integer weightPercent2;

    @ApiModelProperty("删除标志（0代表存在 2代表删除）")
    @TableField("del_flag")
    @TableLogic(delval = "2",value = "0")
    private String delFlag;

    @ApiModelProperty("处理状态（A个人填写完成情况，B考核人打分，C人力资源部确认，D完成）")
    @TableField("status")
    private String status;

    @ApiModelProperty("第一评分合计")
    @TableField("assessor1_total")
    private BigDecimal assessor1Total;

    @ApiModelProperty("第二评分合计")
    @TableField("assessor2_total")
    private BigDecimal assessor2Total;

    @ApiModelProperty("第一评分人状态")
    @TableField("assessor1_status")
    private Boolean assessor1Status;

    @ApiModelProperty("第一评分人状态")
    @TableField("assessor2_status")
    private Boolean assessor2Status;
}
